#include "GameState.h"

GameState::GameState()
{
	//-- Initialise markers
	for(int AR = 0; AR < 6; AR++)
	{
		mARCardTransforms[AR] = new abfw::Matrix44();
		mARCardFound[AR] = false;
		mARCardInUse[AR] = false;
	}
}
GameState::~GameState()
{
	delete mARCardTransforms;
	delete mARCardFound;
	delete mARCardInUse;
}

void GameState::SetARCardTransform(int ID, const abfw::Matrix44& Transform)
{
	//-- Sets the specified marker to the transform
	*mARCardTransforms[ID] = Transform;
}

void GameState::ArCardFound(int ID, bool found)
{
	//-- Sets the specified marker to 'found'
	mARCardFound[ID] = found;
}

void GameState::ArCardInUse(int ID, bool inUse)
{
	//-- Sets the specified marker to 'in use'
	mARCardInUse[ID] = inUse;
}

//-- For getting the FPS in each state
void GameState::SetFPS(float fps)
{
	mFps = fps;
}

//-- A funtion for correcting the camera ISO setting so the marker can be found
void GameState::CorrectCamera()
{
	sceCameraSetISO(CAMERA_DEVICE, CAMERA_ATTRIBUTE_ISO);
}